{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a href="javascript:;">团队团员</a></li>
</ul>
<div class="app-content">
    <div class="main" style="margin-top: 0;">
        <div class="app-filter">
            <div class="filter-list">
                <form action="" method="get" class="form-horizontal" role="form" id="form">
                    <input type="hidden" name="c" value="site" />
                    <input type="hidden" name="a" value="entry" />
                    <input type="hidden" name="m" value="{MODULE_NAME}" />
                    <input type="hidden" name="p" value="distribution" />
                    <input type="hidden" name="ac" value="dissysbase" />
                    <input type="hidden" name="do" value="grouponpeople" />
                    <input type="hidden" name="memid" value="{$mid}" />
                    <div class="form-group">
                        <label class="col-sm-2 control-label">关键字类型</label>
                        <div class="col-sm-9">
                            <select name="type" class="form-control">
                                <option value="2" {if $_GPC['type'] == 2}selected{/if}>手机号</option>
                                <option value="4" {if $_GPC['type'] == 4}selected{/if}>真实姓名</option>
                                <option value="3" {if $_GPC['type'] == 3}selected{/if}>昵称</option>
                                <option value="5" {if $_GPC['type'] == 5}selected{/if}>MID</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">关键字</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" name="keyword" id="keyword" value="{$_GPC['keyword']}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"></label>
                        <div class="col-sm-9">
                            <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="app-table-list">
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead class="navbar-inner">
                    <tr>
                        <th style="width:10%;">MID</th>
                        <th style="width:10%;">头像</th>
                        <th style="width:20%;">昵称</th>
                        <th style="width:20%;">手机</th>
                        <th style="width:20%;">真实姓名</th>
                        <th style="width:10%;">分销商</th>
                        <th style="width:10%;">团长</th>
                    </tr>
                    </thead>
                    <tbody>
                    {loop $list $peoo}
                    <tr id="{$peoo['id']}">
                        <td>{$peoo['mid']}</td>
                        <td><img style="height: 50px;width: 50px;" src="{php echo tomedia($peoo['avatar'])}" ></td>
                        <td>{$peoo['nickname']}</td>
                        <td>{$peoo['mobile']}</td>
                        <td>{$peoo['realname']}</td>
                        <td>
                            {if $peoo['disflag'] > 0}
                            <span class="label label-success">{$peoo['dislevelname']}</span>
                            {else}
                            <span class="label label-default">非分销商</span>
                            {/if}
                        </td>
                        <td>
                            {if $peoo['groupflag'] > 0}
                            <span class="label label-warning">{$peoo['grouplevelname']}</span>
                            {else}
                            <span class="label label-default">非团长</span>
                            {/if}
                        </td>
                    </tr>
                    {/loop}
                    </tbody>
                </table>
            </div>
            <div class="app-table-foot clearfix">
                <div class="pull-left">

                </div>
                <div class="pull-right">
                    {$pager}
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function de(){
        myrequire(['select2'], function() {
            console.log('111');
            $('.chosen-select').select2({
                ajax: {
                    url: "{php echo web_url('distribution/dissysbase/getuser')}",
                    dataType: 'json',
                    data: function (params) {
                        var query = { //请求的参数, 关键字和搜索条件之类的
                            search: params.term //select搜索框里面的value
                        }
                        // Query paramters will be ?search=[term]&page=[page]
                        return query;
                    },
                    processResults: function (data) {
                        return {
                            results: data  //必须赋值给results并且必须返回一个obj
                        };
                    }
                }
            });
        });
    }
</script>
{php include wl_template('common/footer');}